

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit HealthRecord</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">HealthRecord List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New HealthRecord</g:link></span>
        </div>
        <div class="body">
            <h1>Edit HealthRecord</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${healthRecordInstance}">
            <div class="errors">
                <g:renderErrors bean="${healthRecordInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${healthRecordInstance?.id}" />
                <input type="hidden" name="version" value="${healthRecordInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="gender">Gender:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'gender','errors')}">
                                    <g:select id="gender" name="gender" from="${healthRecordInstance.constraints.gender.inList}" value="${healthRecordInstance.gender}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="height">Height:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'height','errors')}">
                                    <input type="text" id="height" name="height" value="${fieldValue(bean:healthRecordInstance,field:'height')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="weight">Weight:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'weight','errors')}">
                                    <input type="text" id="weight" name="weight" value="${fieldValue(bean:healthRecordInstance,field:'weight')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="bloodType">Blood Type:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'bloodType','errors')}">
                                    <g:select id="bloodType" name="bloodType" from="${healthRecordInstance.constraints.bloodType.inList}" value="${healthRecordInstance.bloodType}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="bloodPressure">Blood Pressure:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'bloodPressure','errors')}">
                                    <input type="text" id="bloodPressure" name="bloodPressure" value="${fieldValue(bean:healthRecordInstance,field:'bloodPressure')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="BMI">BMI:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'BMI','errors')}">
                                    <input type="text" id="BMI" name="BMI" value="${fieldValue(bean:healthRecordInstance,field:'BMI')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="procedures">Procedures:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'procedures','errors')}">
                                    
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="lastUpdated">Last Updated:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:healthRecordInstance,field:'lastUpdated','errors')}">
                                    <g:datePicker name="lastUpdated" value="${healthRecordInstance?.lastUpdated}" ></g:datePicker>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
